import {Base} from "../../utils/base.js";

class Category extends Base {

    constructor(){
        super();
    }
    
    getCategoryList(callBack){
        var params = {
            url: 'category',
            sCallBack: function (data) {
              callBack && callBack(data.data);
            }
          }
          this.request(params);
    }

    getProductByCateId(id,callBack){
        var params = {
            url: 'product/by_category?id=' + id,
            sCallBack: function (data) {
              callBack && callBack(data.data);
            }
          }
          this.request(params);
    }
}
export{Category};